Skip to content

Conversation

@EricGustin
Copy link
Member

@EricGustin EricGustin commented Jan 2, 2026

Resolves TOO-201

Documentation PR for this is here: ArcadeAI/docs#626


Note

Improves environment handling by discovering .env files via upward traversal and wiring it through server and CLI flows.

  • Add find_env_file() in arcade_mcp_server.settings and use it in MCPSettings.from_env() for auto-loading .env
  • Update MCPApp reload to watch .py files and the discovered .env (even outside cwd) and include it in watcher paths
  • CLI:
    • configure.get_tool_secrets() now loads secrets from discovered .env
    • deploy searches for .env, loads it, and only uploads --secrets all when a file exists
    • utils.resolve_provider_api_key() now searches upward for .env
  • Templates: move and expand minimal template .env.example to project root with clear guidance
  • Tests: add coverage for .env discovery and configure.get_tool_secrets(); introduce env isolation fixture to prevent leakage between tests
  • Version bumps: arcade-mcp-server1.15.0; arcade-mcp1.9.0 and update dependency pins accordingly

Written by Cursor Bugbot for commit 83cd2b3. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 80.55556% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libs/arcade-cli/arcade_cli/deploy.py 16.66% 5 Missing ⚠️
...ibs/arcade-mcp-server/arcade_mcp_server/mcp_app.py 71.42% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@EricGustin EricGustin changed the title Improve .env discovery Improve .env discovery Jan 2, 2026
@EricGustin EricGustin requested a review from a team January 13, 2026 20:34
if env_path.exists():
# Step 3: Load .env file if it exists (searches upward through parent directories)
console.print("\nSearching for .env file...", style="dim")
env_path = find_env_file()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the implications if this traverses very far up (say, ~/, or C:\ on Windows) and finds a random .env file? What could accidentally be in memory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants